//
//  HD_HSP_Setting_ViewController.m
//  HDLiaoNingMeseum
//
//  Created by HDHaoShaoPeng on 2017/8/5.
//  Copyright © 2017年 HDNiuKuiming. All rights reserved.
//

#import "HD_HSP_Setting_ViewController.h"
#import "HD_LY_DownloadManager.h"

@interface HD_HSP_Setting_ViewController ()
@property(strong,nonatomic)HD_LY_DownloadManager *downloadManager;

@property (weak, nonatomic) IBOutlet UILabel *settingLabel;
@property (weak, nonatomic) IBOutlet UILabel *languageLabel;
@property (weak, nonatomic) IBOutlet UILabel *downloadLabel;

@end

static HDDeclare *declare;

@implementation HD_HSP_Setting_ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    declare = [HDDeclare sharedDeclare];
    
    self.settingLabel.text = declare.setting;
    self.settingLabel.font = [UIFont fontWithName:@"FZQKBYSJW--GB1-0" size:18.0];
    
    self.languageLabel.text = declare.settingLanguage;
    self.languageLabel.font = [UIFont fontWithName:@"FZQKBYSJW--GB1-0" size:18.0];
    
    self.downloadLabel.text = declare.settingRenewResource;
    self.downloadLabel.font = [UIFont fontWithName:@"FZQKBYSJW--GB1-0" size:18.0];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

#pragma mark - 点击方法
- (IBAction)languageClicked:(id)sender {
    [self.navigationController popToRootViewControllerAnimated:YES];
}

- (IBAction)switchValueChanged:(id)sender {
    UISwitch *theSwitch = (UISwitch *)sender;
    if (theSwitch.on) {
        
    }
}

- (IBAction)downloadResourceClicke:(id)sender {
    [self.downloadManager myDownloadAction:self.navigationController.visibleViewController withType:kDownload_Tpye_AllRes WithFileNo:nil];
    self.downloadManager.successBlock = ^{
        NSLog(@"AllRes下载完成....");
    };
}

- (IBAction)backClicked:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}


#pragma mark - 懒加载

-(HD_LY_DownloadManager *)downloadManager
{
    if (!_downloadManager) {
        _downloadManager = [[HD_LY_DownloadManager alloc]init];
    }
    return _downloadManager;
}

@end
